package com.esri.core.map;

import com.esri.core.geometry.Geometry;
import com.esri.core.symbol.Symbol;
import java.util.HashMap;
import java.util.Map;

/* loaded from: classes.dex */
public class FeatureUtil {
    public static final void updateFeatureSetGeometryType(FeatureSet featureSet, Geometry.Type type) {
        if (featureSet != null) {
            featureSet.a(type);
        }
    }

    public static final Graphic newGraphic(int i, Geometry geometry, Symbol symbol, Map<String, Object> map) {
        return new Graphic(i, geometry, symbol, map);
    }

    public static final Graphic newGraphic(int i, Geometry geometry, Symbol symbol, Map<String, Object> map, int i2) {
        return new Graphic(i, geometry, symbol, map, i2);
    }

    public static final Map<Integer, Graphic> getGraphicMap(FeatureSet featureSet, String str) {
        Graphic[] graphics;
        HashMap hashMap = new HashMap();
        if (featureSet != null && (graphics = featureSet.getGraphics()) != null) {
            Integer num = new Integer(0);
            for (Graphic graphic : graphics) {
                if (graphic != null) {
                    if (str != null) {
                        num = (Integer) graphic.getAttributeValue(str);
                        hashMap.put(num, graphic);
                    } else {
                        Integer valueOf = Integer.valueOf(num.intValue() + 1);
                        hashMap.put(new Integer(num.intValue()), graphic);
                        num = valueOf;
                    }
                }
            }
        }
        return hashMap;
    }
}
